package com.pfizer.Entity;

import java.util.Date;

/**
 * pVideo--<b>影片信息實體</b>--靜態變量為創建數據庫表需要的字段名
 * 
 * @author krui
 * @version 1.40 2011/11/19
 */

public class pVideo{

	public static final String 		VIDEOSTRING="Video";
	public static final String 		VIDEOIDSTRING="Video_ID";
	public static final String 		VIDEONAMESTRING="Video_Name";
	public static final String		VIDEOTYPESTRING="Video_Type";
	public static final String 		VIDEODESCSTRING="Video_Desc";
	public static final String 		VIDEOSOURCESTRING="Video_Source";
	public static final String 		VIDEONETFILESTRING="Video_File";
	public static final String 		VIDEOPICSTRING="Video_Pic";
	public static final String	 	VIDEOUPDTIMESTRING="Video_Upd_Time";
	public static final String		VIDEOCLASSSTRING="VideoClass";
	public static final String 		VIDEOQNSTRING="Questionnaire";
	public static final String		VIDEOLUTIMESTRING="Last_Upd_Time";
	public static final String		VIDEOLOCALPICSTRING="Video_LocalPic";
	public static final String		VIDEOLOCALFILESTRING="Video_LocalFile";
	private long 		Video_ID=0;
	private String 	Video_Name="";
	private String		Video_Type="";
	private String 	Video_Desc="";
	private String 	Video_Source="";
	private String 	Video_NetFile="";
	private String 	Video_Pic="";
	private long	 	Video_Upd_Time;
	private String		VideoClass;
	private long 	Questionnaire=-1;
	private long		Last_Upd_Time;
	private String		Video_LocalPic="";
	private String		Video_LocalFile="";
	private Date		dt;
	public pVideo(long _ID,String _Name,String _Type,String _Desc,String _Source,String _NetFile,String _Pic,String _UpdTime,String  _Class,long _Questionnaire,String _LstTime,String _LocalPic,String _LocalFile)
	{
		this.Video_ID=_ID;
		this.Video_Name=_Name;
		this.Video_Type=_Type;
		this.Video_Desc=_Desc;
		this.Video_Source=_Source;
		this.Video_NetFile=_NetFile;
		this.Video_Pic=_Pic;
		dt=new Date(_UpdTime);
		this.Video_Upd_Time=dt.getTime()/1000;
		this.VideoClass=_Class;
		this.Questionnaire=_Questionnaire;
		dt=new Date(_LstTime);
		this.Last_Upd_Time=dt.getTime()/1000;
		this.Video_LocalPic=_LocalPic;
		this.Video_LocalFile=_LocalFile;
	}
	public pVideo()
	{
		
	}
	public pVideo(String _ID)
	{
		this.Video_ID=new Long(_ID).intValue();
	}
	public void setID(String _ID)
	{
		this.Video_ID=new Long(_ID).intValue();
	}
	public void setID(long _ID)
	{
		this.Video_ID=_ID;
	}
	public long getID()
	{
		return this.Video_ID;
	}
	public void setName(String _Name)
	{
		this.Video_Name=_Name;
	}
	public String getName()
	{
		return this.Video_Name;
	}
	public void setType(String _Type)
	{
		if(_Type==null||_Type.length()==0)
		{
			this.Video_Type="1";
		}
		else
		{
			this.Video_Type=_Type;
		}
	}
	public String getType()
	{
		return this.Video_Type;
	}
	public void setDesc(String _Desc)
	{
		this.Video_Desc=_Desc;
	}
	public String getDesc()
	{
		return this.Video_Desc;
	}
	public void setSource(String _Source)
	{
		this.Video_Source=_Source;
	}
	public String getSource()
	{
		return this.Video_Source;
	}
	public void setNetFile(String _NetFile)
	{
		this.Video_NetFile=_NetFile;
	}
	public String getNetFile()
	{
		return this.Video_NetFile;
	}
	public void setPic(String _Pic)
	{
		this.Video_Pic=_Pic;
	}
	public String getPic()
	{
		return this.Video_Pic;
	}
	public void setUpdTime(String _UpdTime)
	{
		dt=new Date(_UpdTime);
		this.Video_Upd_Time=dt.getTime()/1000;
	}
	public long getUpdTime()
	{
		return this.Video_Upd_Time;
	}
	public void setVideoClass(String  _Class)
	{
		if(_Class==null||_Class.length()==0)
		{
			this.VideoClass="1";
		}
		else
		{
			this.VideoClass=_Class;
		}
	}
	public String getVideoClass()
	{
		return this.VideoClass;
	}
	public void setQuestionnaire(String _Questionnaire)
	{
		if(_Questionnaire==null||_Questionnaire.length()==0)
		{
			this.Questionnaire=-1;
		}
		else
		{
			this.Questionnaire=new Long(_Questionnaire).intValue();
		}
	}
	public void setQuestionnaire(long _Questionnaire)
	{
		this.Questionnaire=_Questionnaire;
	}
	public long getQuestionnaire()
	{
		return this.Questionnaire;
	}
	public void setLstUpdTime(String _LstUpdTime)
	{
		try
		{
			dt=new Date(_LstUpdTime);
			this.Last_Upd_Time=dt.getTime()/1000;
		}
		catch(Exception ex)
		{
			this.Last_Upd_Time=this.Video_Upd_Time;
		}
	}
	public void setLstUpdTime(long _LstUpdTime)
	{
		this.Last_Upd_Time=_LstUpdTime;
	}
	public long getLstUpdTime()
	{
		return this.Last_Upd_Time;
	}
	public void setLocalPic(String _LocalPic)
	{
		this.Video_LocalPic=_LocalPic;
	}
	public String getLocalPic()
	{
		return this.Video_LocalPic;
	}
	public void setLocalFile(String _LocalFile)
	{
		this.Video_LocalFile=_LocalFile;
	}
	public String getLocalFile()
	{
		return this.Video_LocalFile;
	}
	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return String.valueOf(this.Video_ID)+",name  "+this.Video_Name+"  Desc  "+this.Video_Desc+"\n";
	}
}
